<div class="layuimini-main">
    <table class="layui-hide" id="accessLogTableId" lay-filter="accessLogTableFilter"></table>
</div>

<script>
    layui.use(['form', 'table', 'layer'], function () {
        var table = layui.table;
        var mockId = window.mockId;
        console.log("mockId = " + mockId)

        var accessLogTable = table.render({
            elem: '#accessLogTableId',
            url: '/mockinfo/accessLog',
            contentType: 'application/json',
            method: 'post', //如果无需自定义HTTP类型，可不加该参数
            where: {'mockId': mockId}, // 初始化时带的参数
            cols: [
                [
                    {type: 'numbers', width: '5%', title: '序号', align: 'center'},
                    {field: 'accessTime', width: '15%', title: '访问时间'},
                    {field: 'accessIp', width: '15%', title: '访问IP'},
                    {field: 'accessAddress', width: '25%', title: '访问IP归属地'},
                    {field: 'accessUserAgent', title: 'userAgent', expandedMode: 'tips'},
                ]
            ],
            skin: 'line', // 行边框风格
            limits: [10, 15, 20, 25, 50, 100],
            limit: 10,
            page: true
        });
    });

</script>